package com.bao.work.generics04;

import java.util.Arrays;

/**
 * @author baoye
 * @date 2024-07-30/19:01
 */
public class Main {
    public static void main(String[] args) {
        Integer[] Is={5,9,7,6,55,98};
        System.out.println(Arrays.toString(Is));
        reverse(Is);
        System.out.println(Arrays.toString(Is));
    }
    public static<T> void reverse(T[] arr){
        for (int s=0,e=arr.length-1;s<=e;s++,e--){
            T temp=arr[s];
            arr[s]=arr[e];
            arr[e]=temp;
        }
    }
}
